<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <jsp:include page="/public/inc/head.jsp"/>
</head>
<body>
<div id="header" class="navbar navbar-static-top" role="navigation">
    <jsp:include page="/public/inc/top.jsp"/>
</div>
<div class="container-fluid" style="margin-top:5px;margin-bottom:60px;">
    <div class="row">
        <jsp:include page="/public/inc/menu.jsp"/>
        <div class="col-xs-12 col-sm-10">
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <div class="media">
                        <div class="media-body">
                            <span class="glyphicon glyphicon-list"></span> 编辑
                        </div>
                        <div class="media-right">
                            <a href="/system/wwdx_book/list" class="btn btn-primary">
                                <span class="glyphicon glyphicon-plus"></span> 返回
                            </a>
                        </div>
                    </div>
                </div>
                <div class="panel-body">
                    <form id="form1" action="/system/wwdx_book/addCDKEY" method="post" enctype="multipart/form-data">
                        <input type="hidden" value="${bookid}" name="bookid">
                        <div class="form-horizontal">
                            <div class="form-group">
                                <label class="control-label col-md-2">轮循次数</label>
                                <div class="col-md-3">
                                    <input type="text" value="1" id="loop" class="form-control" name="loop" placeholder="必须为数字类型"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-offset-2 col-md-10">
                                    <button type="submit" class="btn btn-primary">
                                        <i class="fa fa-floppy-o"></i> 保存
                                    </button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<jsp:include page="/public/inc/bottom.jsp"/>
</body>
</html>
<script type="text/javascript">
    $(document).ready(function () {
        $("#form1").bootstrapValidator({
            feedbackIcons: {
                valid: 'glyphicon glyphicon-ok',
                invalid: 'glyphicon glyphicon-remove',
                validating: 'glyphicon glyphicon-refresh'
            },
            fields: {
                loop: {
                    validators: {
                        notEmpty: {
                            message: '不能为空'
                        },
                        regexp: {
                            regexp: /^(\+?[1-9]\d{0,2}|\+?1000)$/,
                            message: '1-1000'
                        }
                    }
                }
            }
        });
    });
</script>